package com.edu.account.controller;


import com.edu.account.service.ITAccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author dingchengyu
 * @since 2022-05-13
 */
@RestController
@RequestMapping("account")
public class TAccountController {

    @Autowired
    private ITAccountService accountService;

    /**
     * 扣减账户金额
     *
     * @param userId
     * @param money
     * @return
     */
    @RequestMapping("/deductAccount")
    public Long deductAccount(Long userId, Long money) {
        return accountService.deductAccount(userId, money);
    }
}
